package com.txzt.gaea.config;

import com.txzt.gaea.common.util.AuthUtil;
import com.txzt.gaea.common.util.ToolUtil;
import org.beetl.ext.spring.BeetlGroupUtilConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * beetl拓展配置,绑定一些工具类,方便在模板中直接调用
 *
 * @author stylefeng
 * @Date 2018/2/22 21:03
 */
@Component
public class BeetlConfiguration extends BeetlGroupUtilConfiguration {


    @Autowired
    private AuthUtil authUtil;



    @Override
    public void initOther() {
//          groupTemplate.registerFunctionPackage("adminUser", AdminUserContext.getUser());
//        groupTemplate.registerFunctionPackage("shiro", shiroExtOther);
        groupTemplate.registerFunctionPackage("tool", new ToolUtil());
        groupTemplate.registerFunctionPackage("authUtil",authUtil);
//        groupTemplate.registerFunctionPackage("kaptcha", new KaptchaUtil());
    }
}
